From: Florian Müllner Date: Mon, 12 Sep 2022 14:44:27 +0000 (+0200) Subject: altTab: Always include label in thumbnail X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~435^2^2~21 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=022c64961c22afcfe865186b5e190a7c9446ff15;p=gnome-shell.git altTab: Always include label in thumbnail We currently special-case the no-window-title case when creating items, but not when accessing labels later, for example during allocation. The easiest option it to create the label unconditionally, so do that. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5851 Part-of: --- diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 95dc75f02..a3daebc20 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -917,20 +917,16 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList { box.add_actor(bin); this._thumbnailBins.push(bin); - let title = windows[i].get_title(); - if (title) { - let name = new St.Label({ - text: title, - // St.Label doesn't support text-align - x_align: Clutter.ActorAlign.CENTER, - }); - this._labels.push(name); - box.add_actor(name); + const title = windows[i].get_title(); + const name = new St.Label({ + text: title, + // St.Label doesn't support text-align + x_align: Clutter.ActorAlign.CENTER, + }); + this._labels.push(name); + box.add_actor(name); - this.addItem(box, name); - } else { - this.addItem(box, null); - } + this.addItem(box, name); } this.connect('destroy', this._onDestroy.bind(this));